Dynomotion

Group: DynoMotion Message: 15047 From: Tom Kerekes Date: 9/26/2017
Subject: Re:_[DynoMotion]_Set_KmotionCNC_G-code_DRO=e2=80=99s_back to pre-sto
I assume you have encoders so Positions are tracked during the coffee break.

The normal solution is to re-enable setting the commanded position to the current Encoder position with:

EnableAxisDest(0,ch0->Position);

Are you currently doing this?

Regards
TK

On 9/26/2017 11:19 PM, mike.bax@... [DynoMotion] wrote:
 

Hi,

 

I’ve got a client who wants to use the KMotionCNC stop button not only as an emergency button, but also as a means of shutting his machine down / pausing in case he’s out for coffee. This saves on energy, noise and oil (when the axes are enabled the oil pump lubes the linear ways on a fixed interval).

When he then returns to resume work, he does not want to re-home.

Pressing the stop button kills all threads, the raw machine coordinates remain, so re-homing should not be necessary. However, upon re-initialization the KMotionCNC G-code position is lost or jumps to some other value. This is expected behavior, since the G-code interpreter state is lost upon pressing stop.

So what is the nicest way to set the KMotionCNC G-code coordinates back? 

I thought about writing a stop.c program that is called upon pressing stop and then saving the DRO's as persist variables and than add some code to init.c to set the KMotionCNC DRO's back, but there is probably a better way of doing this.